<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul class="nav">
        <li>我的首页</li>
        <li>产品介绍</li>
        <li>联系方式</li>
    </ul>
    <script>
        const ul = document.querySelector('.nav  ')
        const lis = document.getElementsByClassName('li')
        for(let i = 0;i < lis.length;i++){
            console.log(lis[i]);
            
        }
    </script>
</body>
</html>